package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.domain.CommonResult;
import com.atguigu.springcloud.domain.Order;
import com.atguigu.springcloud.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.awt.image.ComponentColorModel;

/**
 * @author :hucaiyuan
 * @date :2022/02/26   14:13
 * @description :
 */
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping(value = "/order/create")
    public CommonResult creatOrder(Order order){
        orderService.create(order);
        return  new CommonResult(200,"订单创建成功!");
    }
}
